package com.xidian.zhiancloud.controller.emergencyManagement;

import com.xidian.zhiancloud.controller.base.BaseController;
import com.xidian.zhiancloud.dto.ResultDTO;
import com.xidian.zhiancloud.enums.GeneralResponseEnums;
import com.xidian.zhiancloud.service.emergencyManagement.EmergencyPlanManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Summerless
 * @Date: 2021/1/25 20:45
 */
@RestController
@RequestMapping("/EmergencyPlanStatistics")
public class EmergencyPlanStatistics extends BaseController {
    @Autowired
    private EmergencyPlanManagementService emergencyPlanManagementService;

    @GetMapping("/type1")
    public ResultDTO type1(@RequestParam(value = "organizationId", required = false) Long id) {
        Long companyId  = getSessionUserCompanyId();
        return ResultDTO.successOf(emergencyPlanManagementService.type1(id, companyId), GeneralResponseEnums.SUCCESS);
    }

}
